package top.continew.wechat.common.constant;

/**
 * 公共常量类
 */
public class CommonConstant {
    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 未授权
     */
    public static final Integer UNAUTHORIZED = 401;

    /**
     * 禁止访问
     */
    public static final Integer FORBIDDEN = 403;

    /**
     * 未找到
     */
    public static final Integer NOT_FOUND = 404;

    /**
     * 请求方法不支持
     */
    public static final Integer METHOD_NOT_ALLOWED = 405;

    /**
     * 请求参数错误
     */
    public static final Integer BAD_REQUEST = 400;

    /**
     * 服务器内部错误
     */
    public static final Integer INTERNAL_SERVER_ERROR = 500;

    /**
     * 服务不可用
     */
    public static final Integer SERVICE_UNAVAILABLE = 503;

    /**
     * 请求超时
     */
    public static final Integer GATEWAY_TIMEOUT = 504;

    /**
     * 默认页码
     */
    public static final Integer DEFAULT_PAGE_NUM = 1;

    /**
     * 默认页大小
     */
    public static final Integer DEFAULT_PAGE_SIZE = 10;

    /**
     * 最大页大小
     */
    public static final Integer MAX_PAGE_SIZE = 100;

    /**
     * 用户Token前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 用户Token请求头
     */
    public static final String TOKEN_HEADER = "Authorization";

    /**
     * 用户ID请求头
     */
    public static final String USER_ID_HEADER = "X-User-Id";

    /**
     * 用户名请求头
     */
    public static final String USERNAME_HEADER = "X-Username";
}
